/**
 * Copyright(c) 2010 Ceno Techonologies Co., Ltd.
 *
 * History:
 *   15-5-14 上午11:10 Created by lyyang
 */
package com.xunton.bss.weixin.api.user;

import javax.inject.Named;

import com.jade.framework.base.util.HttpUtils;
import com.xunton.bss.weixin.api.user.pdu.UserInfo;

/**
 * 微信用户代理
 *
 * @author <a href="mailto:lyyang@ceno.cn">lyyang</a>
 * @version 1.0 15-5-14 上午11:10
 */
@Named ("weixin_userAgent")
public class UserAgent
{
    public UserInfo getUserInfo(String accessToken,String openId) throws Exception{
        String url = "https://api.weixin.qq.com/sns/userinfo?access_token="+accessToken+"&openid="+openId+"&lang=zh_CN";
        UserInfo info = HttpUtils.getHttp(url,UserInfo.class);
        return info;
    }
}
